package com.plat.sdk.okgo.exception;

import com.plat.sdk.okgo.bean.ToResponseBean;
import com.google.gson.Gson;

/**
 * Created by ccb on 2017/12/7.
 */

public class MyException extends IllegalStateException {

    private ToResponseBean errorBean;

    public MyException(String s) {
        super(s);
        errorBean = new Gson().fromJson(s, ToResponseBean.class);
    }

    public ToResponseBean getErrorBean() {
        return errorBean;
    }
}
